Skip to content

Fix inode checksum calculation#12

Merged
Eeems merged 9 commits intomainfrom
crc32c
Dec 12, 2025
Merged

Fix inode checksum calculation#12
Eeems merged 9 commits intomainfrom
crc32c

Conversation

@Eeems
Copy link
Copy Markdown
Owner

@Eeems Eeems commented Dec 12, 2025

Summary by CodeRabbit

  • New Features

    • Expose extra inode data via a new API and add root inode validation with pass/fail diagnostics.
  • Bug Fixes

    • Checksum handling updated to include extra inode data for improved integrity verification.
  • Chores

    • Project version bumped to 1.2.2.
  • Style

    • Minor import reordering and formatting cleanups (no behavior changes).

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 12, 2025

Walkthrough

Reordered imports in three ext4 modules, added an extra_inode_data property and extended Inode checksum to include extra tail bytes when present, added root inode validation in the test with try/except reporting, and bumped project version from 1.2.1 to 1.2.2.

Changes

Cohort / File(s) Change Summary
Import reordering
ext4/extent.py, ext4/xattr.py
Adjusted import order (moved crc32c / Ext4Struct relative to other imports); no behavioral changes.
Inode checksum & API
ext4/inode.py
Added extra_inode_data property on Inode; reordered imports; Inode.checksum now includes extra inode tail bytes when s_inode_size > base inode size, guarded by size checks.
Test: root inode validation
test.py
Added volume.root.validate() inside try/except catching ext4.struct.ChecksumError; prints "pass" on success, sets FAILED and prints "fail" plus exception on failure.
Project version
pyproject.toml
Bumped project version from 1.2.1 to 1.2.2.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Inspect extra_inode_data property behavior and boundary checks in ext4/inode.py.
  • Verify checksum inclusion logic for tail bytes and formatting of crc32c usage.
  • Confirm test.py catches the correct exception type and that prints/side effects are intentional.
  • Quick lint check for import reorderings in ext4/extent.py and ext4/xattr.py.

Poem

🐇 I hopped through bytes both new and old,
Added tails of data, brave and bold,
Imports tidied, tests now check the root,
Version bumped — a gentle, happy toot!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary focus of the changes, which center on fixing inode checksum calculation by adding extra_inode_data to the checksum computation and related infrastructure changes.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch crc32c

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ec2585 and 74fecb5.

📒 Files selected for processing (2)
  • ext4/inode.py (3 hunks)
  • ext4/xattr.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • ext4/xattr.py
  • ext4/inode.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build pip package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@Eeems Eeems changed the title Switch to crc32c Fix inode checksum calculation Dec 12, 2025
@Eeems Eeems merged commit 4d60e3c into main Dec 12, 2025
26 checks passed
@Eeems Eeems deleted the crc32c branch December 12, 2025 05:14
@coderabbitai coderabbitai Bot mentioned this pull request Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant